#ifndef __FUNC_APP_H__
#define __FUNC_APP_H__

#include<memory>
#include<string>

namespace SC_SUN
{
    class RpcClient;
    class FuncService;
    class FuncHandler;
    class SceneSim;

    class FuncApp
    {

    protected:

        std::string mRouter;
        uint16_t mPort;
        std::string mRpcIp;
        uint16_t mRpcPort;                                                                        ///< 端口号
        
        //需要一个跟地图数据服务连接的客户端
        std::shared_ptr<RpcClient> mRpcClient;

        //算法流程服务
        std::shared_ptr<FuncService> mFuncService;

        //需要处理算法流程服务的数据
        std::shared_ptr<FuncHandler> mFuncHandler;

        //算法推演上下文数据
        std::shared_ptr<SceneSim> mSceneSim;

    public:

    FuncApp(const std::string& router, uint16_t port, const std::string& mapServerIp, uint16_t mapServerPort);
    ~FuncApp();

    bool Start();
    void Stop();

    std::shared_ptr<SceneSim> GetSceneSim();
    std::shared_ptr<RpcClient> GetRpc();
    std::shared_ptr<FuncService> GetService();
    std::shared_ptr<FuncHandler> GetFuncHandler();

    };
}

#endif